home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / tphers01.zip / DISPHERS.PAS < prev    next >
Pascal/Delphi Source File  |  1991-09-08  |  2KB  |  49 lines

  1. {*****************************************************************************}
  2. {*  This program displays all the characters of the hershey font.            *}
  3. {*                                                                           *}
  4. {*  This code is donated to the Public domain.                               *}
  5. {*                                                                           *}
  6. {*  Dov Grobgeld                                                             *}
  7. {*  Department of Chemical Physics                                           *}
  8. {*  The Weizmann Institute of Science                                        *}
  9. {*  Israel                                                                   *}
  10. {*  Email: dov@menora.weizmann.ac.il                                         *}
  11. {*                                                                           *}
  12. {*  8/9/1991                                                                 *}
  13. {*****************************************************************************}
  14. uses graph, dos, tphersh;
  15.  
  16. var
  17.   gd, gm, i,j,k : integer;
  18.   s : string[10];
  19.   mem: longint;
  20.  
  21. begin
  22.   mem:= MaxAvail;
  23.   HersheyLoadGlyphs;
  24.   writeln('Font load size: ', mem - MaxAvail);
  25.   write('Press Enter to continue...'); readln; 
  26.  
  27.   gd:= detect;
  28.   initgraph(gd, gm, getenv('bgidir')); { Set the environment variable bgi dir }
  29.                                        { to the directory where the bgi files reside }
  30.  
  31.   for i:= 1 to 20 do begin
  32.     for j:= 1 to 10 do begin
  33.       HersheySetGlyphSize(6,6);
  34.       str((i-1)*200 + (j-1)*20: 4, s);
  35.       HersheyOutTextXY(1,j*35,s);
  36.       HersheySetGlyphSize(20,20);
  37.       for k:= 1 to 20 do begin
  38.         HersheyMove(20+k*25,j*35);
  39.         HersheyDisplayGlyph((i-1)*200+(j-1)*20+k);
  40.       end;
  41.     end;
  42.     readln; { Wait until keypressed }
  43.     ClearViewPort;
  44.   end;
  45.         
  46.   closegraph;
  47. end.
  48.  
  49.